<template>
  <div class="app-container">
    <el-card>
      <el-row>
        <el-col :span="12">
          <div class="line">节目：{{ info.title }}</div>
          <div class="line">频率：{{ info.channel_name }}</div>
          <div class="line">电台：{{ info.radio_name }}</div>
        </el-col>
        <el-col :span="12">
          <div class="line">类别：{{ info.category_name }}</div>
          <div class="line">省份：{{ info.province_name }}</div>
          <div class="line">城市：{{ info.city_name }}</div>
        </el-col>
      </el-row>
      <el-row>
        <el-col>
          <div>简介：{{ info.introduction }}</div>
        </el-col>
      </el-row>

    </el-card>
    <radio-program-play-list v-if="info.number" :programme-id="programmeId" :programme-info="info"/>
  </div>
</template>

<script>
import { apiCbct } from '../../../api/cbct/cbct'
import RadioProgramPlayList from './play_list'

export default {
  name: 'RadioProgramCard',
  components: { RadioProgramPlayList },
  props: {
    programmeId: {
      type: String,
      default: undefined
    }
  },
  data() {
    return {
      info: {}
    }
  },
  created() {
    this.Init()
  },
  methods: {
    Init() {
      apiCbct.getProgrammeInfo({ programmeId: this.programmeId }).then(res => {
        this.info = res.data.data || {}
        console.log(res)
      })
    }
  }
}
</script>

<style lang="scss" scoped>
  .line {
    margin-bottom: 5px;
  }
</style>
